<template>
  <div style="font-size:0.9rem;background:#f1f1f1;min-height:85vh">
    <navTop :headTitle="headTitle" :showBack="showBack" :bkParam="bkParam"></navTop>
    <section class="section_status changeBgToRed">
      <div class="section_top">
        <p>已付款</p>
        <p>待发货</p>
      </div>
    </section>
    <section class="section_con" style="background:#f1f1f1">
      <div class="section_con2">
        <p>医生：{{doctorname}}</p>
        <!--         <p>药房名称：{{$route.query.yaofangname}}</p>
        <p>药房地址：{{$route.query.yaofangadr}}</p>
        <p>药房电话：{{$route.query.yaofangphone}}</p> -->
      </div>
      <div class="section_con3">
        <p>收药人：{{syr}}</p>
        <p>收药地址：{{shadr}}</p>
        <p>联系电话：{{syrdh}}</p>
      </div>
      <!-- <div class="section_con4">
        <p>患者留言：{{$route.query.leavemes}}</p>
      </div> -->
      <!-- 隐藏的药品详细信息
      <div class="section_con5" v-if="this.$route.query.oprlb
      =='1'"
      >
        <table>
          <thead>
            <tr>
              <th style="width:90%;font-size:0.9rem">品名（规格）</th>
              <th style="width:25%;font-size:0.9rem;text-align:right">金额</th>
            </tr>
          </thead>
          <tbody>
            <tr v-for="item in draglist" :key="item.id">
              <td>{{item.split('#')[1]}}</td>
              <td>{{item.split('#')[2]}}={{item.split('#')[3]}}</td>
            </tr>
          </tbody>
        </table>
      </div>
      <div class="section_con5" v-else>
        <table>
          <thead>
            <tr>
              <th style="width:77%;font-size:0.9rem">品名（规格）</th>
              <th style="width:13%;font-size:0.9rem">数量</th>
              <th style="width:15%;font-size:0.9rem">金额</th>
            </tr>
          </thead>
          <tbody>
            <tr v-for="item in draglist" :key="item.id">
              <td>{{item.split('#')[1]}}</td>
              <td>{{item.split('#')[2]}}</td>
              <td>{{item.split('#')[2]}}={{item.split('#')[3]}}</td>
            </tr>
          </tbody>
        </table>
      </div>
-->
      <div class="section_con6">
        <p>医嘱：{{acsm}}</p>
        <!-- <p class="chooseServer">附加服务：
          <input type="checkbox" id="psf" value="配送费" v-model="$route.query.psf"
            disabled
          >
          <label for="psf">配送费</label>
          <input type="checkbox" id="jgf" value="加工费" v-model="$route.query.jgf"
            disabled
          >
          <label for="jgf">加工费</label>
        </p> -->
      </div>
      <!-- <div class="section_bot">
        <p>订单编号：{{$route.query.ordercode}}</p>
        <p>下单时间：{{$route.query.time}}</p>
        <p>付款时间：{{$route.query.fktime}}</p>
     </div> -->
      <div class="section_con7">
        <!-- <p>
          <span>加工费：{{$route.query.jgf}}元</span>
          <span style="float:right">药品：{{$route.query.yff}}元</span>
        </p> -->
        <p>
          <!-- <span>配送费：{{$route.query.psf}}元</span> -->
          <!--
          <span>金额：{{Number($route.query.jgf)+Number($route.query.yff)+Number($route.query.psf)}}元</span>
          <span style="float:right;color:#f60">已付款：{{Number($route.query.jgf)+Number($route.query.yff)+Number($route.query.psf)}}元</span>
          -->

          <span>金额：{{Number(jeyf)}}元</span>
          <span style="float:right;color:#f60">已付款：{{Number(jeyf)}}元</span>

        </p>
      </div>
    </section>
  </div>
</template>
<script scoped>
import navTop from '~/components/common/navTop';

export default {
  data() {
    return {
      // 修改后数据
      doctorname: '',
      syr: '',
      shadr: '',
      syrdh: '',
      acsm: '',
      jeyf: '',

      // 传递来的参数
      param: '',

      // 修改前数据
      showBack: true,
      bkParam: 'bk',
      headTitle: '药方订单详情',
      // backGround_color: '',
      // prescribeInfo: '',
      // draglist: this.$route.query.draglist.split(','),
      // prescribe: {},
    };
  },
  components: {
    navTop,
  },
  created() {
    this.param = `${this.$route.query.pm}`;
    this.getPrescribeOrder();
  },
  destroyed() {
  },
  methods: {
    getPrescribeOrder() {
      const req = JSON.stringify({
        OTRequest: {
          VERSION: '1.0',
          TN: 'F27.APP.07.05',
          CLIENTID: 'YLAPP',
          RYBID: 'PAT',
          TOKEN: `${sessionStorage.getItem('rybToken') == null ? '' : sessionStorage.getItem('rybToken')}`,
          DATA: {
            ordstatus: '',
            keywords: this.param,
            rowsperpage: '10',
            page: '1',
            ordercolumn: 'openDate',
            ordertype: 'desc',
          },
        },
      });
      this.spost(this.ts, '/doctor/AppMainServlet.ap', {
        '': req,
      }).then((ts) => {
        //
        const list = ts.d.DATAOBJ.DATA;
        // this.kdmc = list[0].kdmc;
        // this.kdno = list[0].kdno;
        // this.kdmcvalue = list[0].kdmcvalue;
        // this.orderstatus = list[0].orderstatus;
        this.doctorname = list[0].doctorname;
        this.syr = list[0].syr;
        this.shadr = list[0].shadr;
        this.syrdh = list[0].syrdh;
        this.acsm = list[0].acsm;
        // this.ordercode = list[0].ordercode;
        // this.time = list[0].time;
        // this.fktime = list[0].fktime;
        // this.delivertime = list[0].delivertime;
        this.jeyf = list[0].jeyf;
      });
    },
  },
};
</script>
<style>
*{
  margin: 0;
  padding: 0;
}
.section_status {
  margin-top: 2.5rem;
  height: 4rem;
}
.section_top p {
  text-align: center;
  color: #fff;
  font-size: 1.6rem;
  font-family: "微软雅黑";
  margin: 0;
  padding-top: 0.8rem;
}
.section_top p:last-child {
  font-size: 1rem;
  font-family: "微软雅黑";
  padding: 0;
}
.section_con1 {
  background: #e7e1a8;
  width: 100%;
}
.section_con p {
  padding-left: 0.5rem;
  margin-bottom: 0.4rem;
  color: #333;
  font-family: "微软雅黑";
}
.section_con div {
  margin-top: 0.5rem;
  background: #fff;
  padding: 0.8rem;
}
.section_con div:first-child {
  margin-top: 0;
}
.section_con1 span:last-child {
  float: right;
  padding-right: 1rem;
}
.section_con2 span {
  float: right;
  padding-right: 1rem;
}
.section_con4 input {
  border: none;
  outline: none;
  width: 80%;
  line-height: 1.4rem;
}
.section_con5 ul {
  margin: 0;
  padding-left: 1rem;
  width: 100%;
  height: 5rem;
}
.section_con5 ul li {
  list-style: none;
  margin-bottom: 0;
  color: #333;
  font-family: "微软雅黑";
  float: left;
  margin: 0.2rem 0.5rem;
}
.section_con6 input{
  margin-left: 2rem;
}
.changeBgToRed {
  background-color:rgb(24, 172, 24);
}
.section_bot p {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  font-family: "微软雅黑";
}
.section_bot span {
  text-align: center;
  margin-right: 1rem;
  padding: 0 0.4rem;
}
.section_con7{
  position: fixed;
  bottom: 0;
  width: 100%
}
</style>

